package com.yb.java.singleton;

/**
 * @program: design-pattern
 * @description: 静态内部类单例模式。
 * @author: Mr.Bo
 * @create: 2021-04-25 20:52
 **/
public class InsideSingleton {

    private static class SingletonHolder{
        private static final InsideSingleton INSTANCE = new InsideSingleton();
    }

    private InsideSingleton() {
    }

    public static InsideSingleton getInstance(){
        return SingletonHolder.INSTANCE;
    }
}
